
package gui;

import java.awt.Color;
import java.awt.Rectangle;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JPasswordField;
import javax.swing.JTextField;
import client.Client;
import gui.MainSystemManger;

public class BlockCommit extends JFrame {

	private JPanel Sub = null;
	private MainCustomer MC;
	private JButton jButtonSerchByName = null;
	private JButton jButtonSearchById = null;
	private JLabel jLabelidfield = null;
	private JTextField jTextFieldId = null;
	private JLabel jLabelUserName = null;
	private JTextField jTextFieldUsenName = null;
	private JButton jButtonBack = null;
	private JButton jButtonNext = null;
	public BlockCommit() {
		super();
		initialize();
	}

	/**
	 * This method initializes AcademicFrame 
	 */
	private void initialize() {
		this.setSize(1000, 720);
		this.setContentPane(getSub());
		this.setTitle("Block User");		
	}

	private JPanel getSub() {
		if (Sub == null) {
			jLabelUserName = new JLabel();
			jLabelUserName.setBounds(new Rectangle(350, 395, 123, 32));
			jLabelUserName.setText("Enter User Name");
			jLabelidfield = new JLabel();
			jLabelidfield.setBounds(new Rectangle(350, 302, 123, 32));
			jLabelidfield.setText("Enter User ID ");
			Sub = new JPanel();
			Sub.setLayout(null);
			Sub.setBackground(Color.CYAN);
			Sub.add(getJButtonSerchByName(), null);
			Sub.add(getJButtonSearchById(), null);
			Sub.add(jLabelidfield, null);
			Sub.add(getJTextFieldId(), null);
			Sub.add(jLabelUserName, null);
			Sub.add(getJTextFieldUsenName(), null);
			Sub.add(getJButtonBack(), null);
			Sub.add(getJButtonNext(), null);
			

		}
		return Sub; 
	}

	/**
	 * This method initializes jButtonSerchByName	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getJButtonSerchByName() {
		if (jButtonSerchByName == null) {
			jButtonSerchByName = new JButton();
			jButtonSerchByName.setBounds(new Rectangle(513, 112, 178, 84));
			jButtonSerchByName.setText("SEARCH BY USER NAME");
			jButtonSerchByName.addActionListener(new java.awt.event.ActionListener() {
				public void actionPerformed(java.awt.event.ActionEvent e) {
					jTextFieldUsenName.setVisible(true);
					jTextFieldId.setVisible(false);
				}
			});
		}
		return jButtonSerchByName;
	}

	/**
	 * This method initializes jButtonSearchById	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getJButtonSearchById() {
		if (jButtonSearchById == null) {
			jButtonSearchById = new JButton();
			jButtonSearchById.setBounds(new Rectangle(282, 112, 178, 84));
			jButtonSearchById.setText("SEARCH BY USER ID");
			jButtonSearchById.addActionListener(new java.awt.event.ActionListener() {
				public void actionPerformed(java.awt.event.ActionEvent e) {
					jTextFieldId.setVisible(true);
					jTextFieldUsenName.setVisible(false);
				}
			});
		}
		return jButtonSearchById;
	}

	/**
	 * This method initializes jTextFieldId	
	 * 	
	 * @return javax.swing.JTextField	
	 */
	private JTextField getJTextFieldId() {
		if (jTextFieldId == null) {
			jTextFieldId = new JTextField();
			jTextFieldId.setBounds(new Rectangle(530, 303, 152, 34));
			jTextFieldId.setVisible(false);
		}
		return jTextFieldId;
	}

	/**
	 * This method initializes jTextFieldUsenName	
	 * 	
	 * @return javax.swing.JTextField	
	 */
	private JTextField getJTextFieldUsenName() {
		if (jTextFieldUsenName == null) {
			jTextFieldUsenName = new JTextField();
			jTextFieldUsenName.setBounds(new Rectangle(530, 393, 152, 34));
			jTextFieldUsenName.setVisible(false);
		}
		return jTextFieldUsenName;
	}

	/**
	 * This method initializes jButtonBack	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getJButtonBack() {
		if (jButtonBack == null) {
			jButtonBack = new JButton();
			jButtonBack.setBounds(new Rectangle(131, 560, 143, 68));
			jButtonBack.setText("BACK");
			jButtonBack.addActionListener(new java.awt.event.ActionListener() {
				public void actionPerformed(java.awt.event.ActionEvent e) {
					MainSystemManger NewSystem = new MainSystemManger();
					NewSystem.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
					NewSystem.setSize( 1000,720 ); // set frame size
					NewSystem.setResizable(true);
					NewSystem.setVisible( true ); // display frame
					BlockCommit.this.dispose();
				    
				}
			});
		}
		return jButtonBack;
	}

	/**
	 * This method initializes jButtonNext	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getJButtonNext() {
		if (jButtonNext == null) {
			jButtonNext = new JButton();
			jButtonNext.setBounds(new Rectangle(672, 560, 143, 68));
			jButtonNext.setText("NEXT");
			jButtonNext.addActionListener(new java.awt.event.ActionListener() {
				public void actionPerformed(java.awt.event.ActionEvent e) {
					BlockPremission BlockPrem = new BlockPremission();
					BlockPrem.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
					BlockPrem.setSize( 1000,720 ); // set frame size
					BlockPrem.setResizable(true);
					BlockPrem.setVisible( true ); // display frame
					BlockCommit.this.dispose();
				    
				}
			});
		}
		return jButtonNext;
	}
	
}  //  @jve:decl-index=0:visual-constraint="12,11"
